package datasv.framework_datasv;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.List;

import datasv.courseQuery_datasv.GetAllCouOfSubModel;
import po.CourseModelPO;
import po.ModelPO;
import po.SubModelPO;
import resultmessage.FrameworkRM;

@SuppressWarnings("serial")
public class FrameworkDatasvController extends UnicastRemoteObject implements FrameworkDatasv {

	public FrameworkDatasvController() throws RemoteException {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	public FrameworkRM addModel(String collegeID, ModelPO po) {
		// TODO Auto-generated method stub
		return new AddModel().addModel(collegeID, po);
	}

	@Override
	public FrameworkRM deleteModel(String collegeID, String modelID) {
		// TODO Auto-generated method stub
		return new DeleteModel().deleteModel(collegeID, modelID);
	}

	@Override
	public ModelPO getModel(String collegeID, String modelID) {
		// TODO Auto-generated method stub
		return new GetModel().getModel(collegeID, modelID);
	}

	@Override
	public FrameworkRM updateModel(String collegeID, ModelPO po) {
		// TODO Auto-generated method stub
		return new UpdateModel().updateModel(collegeID, po);
	}

	@Override
	public FrameworkRM addSubModel(String collegeID, String modelID,
			SubModelPO po) {
		// TODO Auto-generated method stub
		return new AddSubModel().addSubModel(collegeID, modelID, po);
	}

	@Override
	public FrameworkRM deleteSubModel(String collegeID, String modelID,
			String SubModelID) {
		// TODO Auto-generated method stub
		return new DeleteSubModel().deleteSubModel(collegeID, modelID, SubModelID);
	}

	@Override
	public SubModelPO getSubModel(String collegeID, String modelID,
			String subModelID) {
		// TODO Auto-generated method stub
		return new GetSubModel().getSubModel(collegeID, modelID, subModelID);
	}

	@Override
	public FrameworkRM updateSubModel(String collegeID, String modelID,
			SubModelPO po) {
		// TODO Auto-generated method stub
		return new UpdateSubModel().updateSubModel(collegeID, modelID, po);
	}

	@Override
	public List<SubModelPO> getAllSubModelOfModel(String collegeID,
			String modelID) {
		// TODO Auto-generated method stub
		return new GetAllSubModel().getAllSubModelOfModel(collegeID, modelID);
	}

	@Override
	public FrameworkRM deleteCouOfSubModel(String courseID, String subModelID)
			throws RemoteException {
		// TODO Auto-generated method stub
		return new DeleteCouOfSubModel().deleteCouOfSubModel(courseID, subModelID);
	}

	@Override
	public FrameworkRM addCouOfSubModel(String courseID, String subModelID)
			throws RemoteException {
		// TODO Auto-generated method stub
		return new AddCouOfSubModel().addCouOfSubModel(courseID, subModelID);
	}

	@Override
	public CourseModelPO getSubModelOfCou(String courseID)
			throws RemoteException {
		// TODO Auto-generated method stub
		return new GetSubModelOfCou().getSubModelOfCou(courseID);
	}

	@Override
	public FrameworkRM updateSubModelOfCou(String courseID, String submodelID)
			throws RemoteException {
		// TODO Auto-generated method stub
		return new UpdateSubModelOfCou().updateSubModelOfCou(courseID, submodelID);
	}

	@Override
	public boolean canChooseCurriculum() throws RemoteException {
	
		return new GetCondition().canChooseCurriculum();
	}

	@Override
	public boolean canChooseCrossMajor() throws RemoteException {
		// TODO Auto-generated method stub
		return new GetCondition().canChooseCrossMajor();
	}

	@Override
	public boolean canChoosePublic() throws RemoteException {
		// TODO Auto-generated method stub
		return new GetCondition().canChoosePublic();
	}

	@Override
	public boolean changeChooseCurriculum() throws RemoteException {
		// TODO Auto-generated method stub
		return new ChangeCondition().changeChooseCurriculum();
	}

	@Override
	public boolean changeChooseCrossMajor() throws RemoteException {
		// TODO Auto-generated method stub
	
		return  new ChangeCondition().changeChooseCrossMajor();
	}

	@Override
	public boolean changeChoosePublic() throws RemoteException {
		// TODO Auto-generated method stub
		return  new ChangeCondition().changeChoosePublic();
	}

	@Override
	public List<ModelPO> getCollegeModel(String collegeID)
			throws RemoteException {
		// TODO Auto-generated method stub
		System.out.println("...getCollegeModel");
		return new GetCollegeModel().getCollegeModel(collegeID);
	}

	@Override
	public String addModelReturnID(String collegeID, ModelPO model)
			throws RemoteException {
		// TODO Auto-generated method stub
		return new AddModelReturnID().addModelReturnID(collegeID, model);
	}

	@Override
	public String addSubModelReturnID(String collegeID, String modelID,
			SubModelPO submodel) throws RemoteException {
		// TODO Auto-generated method stub
		return new AddSubModelReturnID().addSubModelReturnID(collegeID, modelID, submodel);
	}

	

}
